{// 引入标签库 }

<tagLib name="fanwe" />

{// 加载头部公共文件 }

<include file="Public:header" />
<load href="__TMPL__ThemeFiles/Js/jquery.js" />
<load href="__TMPL__ThemeFiles/Js/jquery.json.js" />
<!-- 菜单区域  -->



<!-- 主页面开始 -->

<div id="main" class="main" >



<!-- 主体内容  -->

<div class="content" >

<div class="title">{$Think.lang.DATA_LIST}</div>

<!--  功能操作区域  -->



<form method='post' action="{:u($module_name.'/index')}">

<div class="operate" >

<fanwe:imageBtn name="add" value="{$Think.lang._ADD_DATA}" click="addData()" style="impBtn hMargin fLeft shadow" />

<fanwe:imageBtn name="edit" value="{$Think.lang._EDIT_DATA}" click="editData()" style="impBtn hMargin fLeft shadow" />

<fanwe:imageBtn name="delete" value="{$Think.lang._DELETE_DATA}" click="foreverdel()" style="impBtn hMargin fLeft shadow" />

<!-- 查询区域 -->



<input type="text" name="name" title="{$Think.lang.NAV_NAME}" class="medium" >

<input type="hidden" name="SEARCH_TYPE" value="like" />

<fanwe:imageBtn type="submit" name="search" value="{$Think.lang._SEARCH_DATA}" style="impBtn hMargin fLeft shadow" />



</div>

<!-- 高级查询区域 -->



</form>



<!-- 功能操作区域结束 -->



<!-- 列表显示区域  -->

<div class="list" >

<fanwe:list 

	id="checkList" 

	name="nav" 

	style="list" 

	checkbox="true" 
	isrel="true" 
	action="true" 

	datasource="list" 

	child="true" 

	show="id:{$Think.lang.ID}|8%,name:{$Think.lang.NAV_NAME}:edit,type|getNavType:{$Think.lang.NAV_TYPE},sort|getSort=$nav['id']:{$Think.lang.SORT},target:是否新窗口打开 " 

	actionlist="edit:{$Think.lang._EDIT_DATA}:id,status|showNavStatus=$nav['id'],id|showNavDel" /> 

</div>


<!--  分页显示区域 -->

<div class="page">{$page}</div>

<!-- 列表显示区域结束 -->

</div>

<!-- 主体内容结束 -->

</div>
<div style="display:none;" id="select_target">
<select id='target'><option value=''>--选择--</option><option value='0'>否</option><option value='1'>是</option></select>
</div>

<!-- 主页面结束 -->
<script type="text/javascript">
jQuery(
function($){
	$("td[rel='target']").each(function(i){
		var thisTD = $(this);
		var cateID = parseInt(thisTD.text());
		var thisSelect =jQuery("<select id='target'><option value='0'>否</option><option value='1'>是</option></select>");
			
		$("option[value='"+cateID+"']",thisSelect).attr("selected",true);
		thisTD.html(thisSelect);
		thisSelect.change(function(){
			var goodsID = $("input",thisTD.parent()).val();
			$.ajax({
				url: APP+"?"+VAR_MODULE+"=Nav&"+VAR_ACTION+"=updateNavTarget&id="+goodsID+"&target="+this.value,
				cache: false,
				success:function(data)
				{
				}
			});
		});
	});
	
	}
 );

</script>



